<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .ipt {
            color: #999;
        }
    </style>
</head>

<body>
    <input type="text" value="请你输入" class="ipt">
    <script>
        var ipt = document.querySelector('.ipt');
        ipt.onfocus = function () {
           if (this.value == '请你输入') {
            this.value = '';
           }
        }
        ipt.onblur = function () {
            if (this.value == '') {
                this.value = '请你输入';
            }
        }
    </script>
</body>

</html>